﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Security.Principal;

using SBPweb.Forge.Contracts.Logging;
using SBPweb.Forge.Modules.Smartparts;
using SBPweb.Forge.Modules.Communication;

namespace SBPweb.Forge.Modules.Modularity
{
    /// <summary>
    /// Base Interface of Host
    /// </summary>
	public interface IModuleHost : IPersistable
    {
        #region Property accessors

        /// <summary>
        /// MenuBar
        /// </summary>
        MenuBase Menu
        {
            get;
        }

        /// <summary>
        /// StaturBar
        /// </summary>
        MenuBase StatusBar
        {
            get;
        }

        /// <summary>
        /// Message queue for communication messages
        /// </summary>
        MessageQueueBase Messages
        {
            get;
        }

        /// <summary>
        /// Smartpars
        /// </summary>
        SmartpartListBase Smartparts
        {
            get;
        }

        /// <summary>
        /// LogManager
        /// </summary>
		ILogManager LogManager
		{
			get;
		}

        /// <summary>
        /// Security Principal
        /// </summary>
        IPrincipal SecurityPrincipal
        {
            get;
        }

        /// <summary>
        /// Supported Cultures of Application
        /// </summary>
		CultureInfo[] SupportedCultures
		{
			get;
		}

		/// <summary>
		/// Module Loader object of the application
		/// </summary>
		ModuleLoader ModuleLoader
		{
			get;
		}
		
		/// <summary>
		/// Type of this host
		/// </summary>
		ModuleHostType HostType
		{
			get;
		}

		/// <summary>
		/// Layout provider of the hist
		/// </summary>
		ILayoutProvider LayoutProvider
		{
			get;
		}

        #endregion

        /// <summary>
        /// Setting UI Culture for Application
        /// </summary>
        /// <param name="ci">Desired Culture</param>
		void SetCulture(CultureInfo ci);

        /// <summary>
        /// This event is fired before application closing
        /// </summary>
        event EventHandler ApplicationClosing;
    }
}
